<?php abstract class RRDTemplate {
	protected static function Filename ($Host, $Class = '', $Name = '') {
		$Result = $Host;
		strlen ($Class) and $Result .= "_$Class";
		strlen ($Name) and $Result .= "_$Name";
		return (strtolower ("$Result.rrd"));
	}
	protected static function Create ($Filename, $CreateStr) {
		RRD::Exec ("info \"$Filename\"", FALSE);
		RRD::LastOK () or RRD::Exec ("create \"$Filename\" --start 'now - 1 hour' $CreateStr");
	}
	protected static function Feed ($Filename, $Time, $Data) {
		RRD::Exec ("update \"$Filename\" $Time:$Data");
	}
} ?>